package com.lucy.nepu.module.property.rule;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class IsNepuValidator implements ConstraintValidator<IsNepu, Object> {

    @Override
    public void initialize(IsNepu constraintAnnotation) {
        ConstraintValidator.super.initialize(constraintAnnotation);
    }

    @Override
    public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
        String name = o.toString();
        if ("东北石油大学".equals(name)) {
            return true;
        }
        return false;
    }
}
